package com.example.demo.mapper;

import com.example.demo.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface Usermapper {

    @Select("select * from test")
    public List<User> findAll();

    @Insert("insert into test values(#{id},#{name},#{password})")
    public void setUser(User user);

    @Delete("delete from test where id=#{id}")
    public void delete(int id);

    @Update("updata test set name=#{name},password=#{password} where id=#{id}")
    public void updata(int id, String name,String password );

}
